#ifndef LOGGER_H
#define LOGGER_H

#include "prep.h"
#include <wx/string.h>

class wxMenu;
class wxWindow;

namespace {
  static wxString temp_string( _T( '\0' ), 250 );
  static wxString newline_string( _T( "\n" ) );
}

class Logger {
  public:
    enum level { caption, info, warning, success, error, critical, failure, pagetitle, spacer, asterisk };
    enum { num_levels = asterisk + 1 };
    struct Feature {
      enum Enum {
        IsWrappable = 0,
        CanClear,
        CanCopy,
        Additional
      };
    };

    Logger() {}
    virtual ~Logger() {}
    virtual void Append( const wxString& msg, Logger::level lv = info ) = 0;
    virtual void Clear() {}
    virtual void CopyContentsToClipboard( M_Code_optional bool selectionOnly = false ) {}
    virtual void UpdateSettings() {}
    virtual wxWindow* CreateControl( M_Code_optional wxWindow* parent ) { return nullptr; }
    virtual bool GetWrapMode() const { return false; }
    virtual bool HasFeature( M_Code_optional Feature::Enum feature ) const { return false; }
    virtual void AppendAdditionalMenuItems( M_Code_optional wxMenu &menu ) {}
};

#endif
